package com.bishe.dao;

import com.bishe.pojo.Admin;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * admin数据层
 * @date 2022/03/20 41:08:16
 */
public interface AdminDao {

    @Select("select * from admin")
    List<Admin> findAll();


    @Select("select * from admin where id = #{id}")
    Admin findById(@Param("id") String id);

    @Delete("delete  from admin where id = #{id}")
    void deleteById(@Param("id") String id);


    @Update("update admin set id = #{id},userName = #{userName},passWord = #{passWord} where id = #{id}")
    void updateById(Admin admin);


    @Insert("insert into admin (id,userName,passWord) values(#{id},#{userName},#{passWord})")
    void save(Admin admin);
}
